package com.gaohe.mapper;

import com.gaohe.pojo.Book;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface BookMapper {
    @Select("select * from tb_book")
    List<Book> listBooks();

    int addBook(Book book);

    @Delete("delete from tb_book where id =#{id}")
    int deleteById(Integer id);

    List<Book> getByConditions(Book book);
//    @Update("update  tb_book  ")
    int updateById(Book book);
}
